package com.hxit.huaxiamelongarden.controller;

import com.hxit.huaxiamelongarden.domin.po.Tags;
import com.hxit.huaxiamelongarden.service.TagService;
import com.hxit.huaxiamelongarden.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName TagController
 * @description 标签类控制器
 * @Author 12694
 * @Date 2025/1/28 19:52
 * @Version 1.0
 **/
@Tag(name = "标签管理接口", description = "提供标签管理的相关功能") // 对整个控制器模块进行描述
@RestController
@RequestMapping("/tag")
@Slf4j
public class TagController {
    @Autowired
    private TagService tagService;
    //查询所有标签
    @Operation(summary = "查询所有标签",description = "查询所有标签")
    @GetMapping("/list")
    public Result getAllTag(){
        List<Tags> tagsList = tagService.getAllTag();
        log.info("查询所有标签:{}",tagsList);
        return Result.success(tagsList);
    }

    

}
